<template>
    <view class="moments">
        <!--    头部组件-->
        <Header title="朋友圈">
            <template #right>
                <uni-icons @click="toAddMoments" type="camera" size="30"></uni-icons>
            </template>
        </Header>
        <view class="mo-content">
            <Message title=""></Message>
        </view>
    </view>
</template>

<script setup lang="ts">
import {ref, type Ref} from 'vue'
import {Icon} from '@iconify/vue';
import {request} from '@/api/request'
import Header from '@/views/Header.vue'
import {onLoad, onShow} from '@dcloudio/uni-app';
import type {FriendDto} from '@/api/model/friend/FriendDto';
import Message from "@/pages/moments/view/Message.vue";

const token = ref('')
const friendList: Ref<FriendDto[]> = ref([])

onLoad(() => {
    findFriend()
})
const onClick = () => {
    console.log('click')
}
const toAddMoments = () => {
    uni.navigateTo({
        url: '/pages/addMoments/addMoments'

    })
}

const findFriend = async () => {
    const value = uni.getStorageSync('token');
    console.log('token' + token.value)
    // const operation = {
    //     method: 'GET',
    //     url: `/main/friend/findFriend`,
    //     data: '',
    //     tokenRequired: true // 新增，表示是否需要token
    // }
    // const res = await request(operation)
    // friendList.value = res.data.friend

}

</script>


<style lang="scss">
.moments {
  overflow: hidden;

  .mo-content {
    height: 86vh;
    overflow: scroll;
  }
    
}
</style>
